import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_ahj_app/base/values/SQColor.dart';
import 'package:flutter_ahj_app/base/values/dimens.dart';

///无数据界面
class NoneData extends StatelessWidget {
  Color bacColor;
  String img;
  String text;

  NoneData({Key key, this.img, this.text, this.bacColor});

  @override
  Widget build(BuildContext context) {
    return  Container(
      color: bacColor == null ? SQColor.lightGray1 : bacColor,
      child: Row(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          Column(
            crossAxisAlignment: CrossAxisAlignment.center,
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Image.asset(
                (img == null || img == "") ? "img/iv_empty.png" : img,
                width: 169.5,
                height: 127.5,
              ),
              Text(
                ((text == null || text == "") ? "暂无数据" : text),
                style: TextStyle(
                    color: SQColor.per38Black, fontSize: Dimens.textSize28),
              )
            ],
          ),
        ],
      ),
    );
  }


  // ListView(
  // children: [
  // Container(
  // height:ScreenUtil.getScreenH(context)-130,
  // color: bacColor == null ? SQColor.per8Black : bacColor,
  // child: Row(
  // crossAxisAlignment: CrossAxisAlignment.center,
  // mainAxisAlignment: MainAxisAlignment.center,
  // children: <Widget>[
  // Column(
  // crossAxisAlignment: CrossAxisAlignment.center,
  // mainAxisAlignment: MainAxisAlignment.center,
  // children: <Widget>[
  // Image.asset(
  // (img == null || img == "") ? "img/iv_empty.png" : img,
  // width: 169.5,
  // height: 127.5,
  // ),
  // Text(
  // ((text == null || text == "") ? "暂无数据" : text),
  // style: TextStyle(
  // color: SQColor.per38Black, fontSize: Dimens.textSize28),
  // )
  // ],
  // ),
  // ],
  // ),
  // )
  // ],
  // )

}
